package com.fqgj.sentry.policy.engine.domain.enums;

import java.io.Serializable;

/**
 * Created by kennykong on 2017/7/20.
 */
public enum VariableTypeEnum implements Serializable {
    /**
     * 变量类型（整形|小数|日期|字符串）
     */
    DATE, DOUBLE, INT, STRING, OBJECT;

    public static VariableTypeEnum transformDatatype(Integer dataType) {
        for (VariableTypeEnum variableTypeEnum : VariableTypeEnum.values()) {
            if (variableTypeEnum.ordinal() + 1 == dataType) {
                return variableTypeEnum;
            }

        }
        return null;
    }

}
